<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: faq_manager.php 001 2005-03-27 dave@open-operations.com
//
?>
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || DEFINE_BREADCRUMB_STATUS == '2' ) { ?>
  <tr>
    <td class="breadCrumb" colspan="2"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></td>
  </tr>
<?php } ?>
<?php if (FAQ_INFO_PREVIOUS_NEXT == '1' or FAQ_INFO_PREVIOUS_NEXT == '3') { ?>
  <tr>
    <td colspan="2" align="center">
      <?php require($template->get_template_dir('/tpl_faqs_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_faqs_next_previous.php'); ?>
    </td>
  </tr>
<?php } ?>


  <tr>
    <td class="pageHeading" valign="top"><h1><?php echo $faqs_name; ?></h1></td>
    <td align="center" valign="top" class="smallText">
      <?php
        if (zen_not_null($faqs_image)) {
          require(DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars_images.php');
        }
        $the_button = $link;
        $faqs_link = '<br />';
      ?>
    </td>
  </tr>
<?php if ($faqs_description != '') { ?>
    <tr align="left">
    <td  class="plainBoxHeading" colspan="2"><?php echo TEXT_DESCRIPTION; ?>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="plainbox-description"><?php echo stripslashes($faqs_description); ?><br /><br /></td>
  </tr>
<?php } ?>
<?php if ($faqs_answer != '') { ?>
      <tr align="left">
    <td  class="plainBoxHeading" colspan="2"><?php echo TEXT_ANSWER; ?>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="plainbox-description"><?php echo stripslashes($faqs_answer); ?></td>
  </tr>
<?php } ?>
<?php
  if (zen_not_null($faqs_url)) {
    if (SHOW_FAQ_INFO_URL == '1') {
?>

  <tr>
    <td  class="plainbox-description" align="center" colspan="2"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($faqs_url), 'NONSSL', true, false)); ?></td>
  </tr>
 <?php
    } // SHOW_FAQ_INFO_URL
  }
?>
<?php require(DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars_images_additional.php'); ?>
<?php if (FAQ_INFO_PREVIOUS_NEXT == '2' or FAQ_INFO_PREVIOUS_NEXT == '3') { ?>
  <tr>
    <td colspan="2" align="center">
      <?php require($template->get_template_dir('/tpl_faqs_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_faqs_next_previous.php'); ?>
    </td>
  </tr>
<?php } ?>
  <tr>
    <td align="center" colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td class="main" align="left" valign="bottom">
<?php
  if ($reviews->fields['count'] > 0 or SHOW_FAQ_INFO_REVIEWS == '1') {
    echo '<table align="left">';
    echo '  <tr>';
    echo '    <td class="main" align="center" valign="bottom">';
    echo (SHOW_FAQ_INFO_REVIEWS_COUNT == '1' ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : '&nbsp;') . '<br />';
    echo (SHOW_FAQ_INFO_REVIEWS == '1' ? '<a href="' . zen_href_link(FILENAME_FAQ_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>' : '&nbsp;');
    echo '    </td>';
    echo '  </tr>';
    echo '</table>';
  }
?>
    </td>
    <td class="main" align="right" valign="bottom">
<?php
  if (SHOW_FAQ_INFO_TELL_A_FRIEND == '1') {
    echo '<table align="right">';
    echo '  <tr>';
    echo '    <td class="main" align="center" valign="bottom">';
    echo (SHOW_FAQ_INFO_TELL_A_FRIEND == '1' ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND_FAQ, 'faqs_id=' . $_GET['faqs_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : '');
    echo '    </td>';
    echo '  </tr>';
    echo '</table>';
  }
?>
    </td>
  </tr>
<?php
  if ($faqs_date_available > date('Y-m-d H:i:s')) {
    if (SHOW_FAQ_INFO_DATE_AVAILABLE == '1') {
?>
  <tr>
    <td colspan="2" align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($faqs_date_available)); ?></td>
  </tr>
<?php
    }
  } else {
    if (SHOW_FAQ_INFO_DATE_ADDED == '1') {
?>
  <tr>
    <td colspan="2" align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($faqs_date_added)); ?></td>
  </tr>
<?php
    } // SHOW_FAQ_INFO_DATE_ADDED
  }
?>
<tr>
  <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
</table>
